<template>
  <div>132</div>
</template>

<script>
import axios from 'axios';

export default {
  name: 'ChartComponent2',
  data() {
    return {
      loading: true,
      error: null,
      statisticsData: null // 用于存储从API获取的数据
    };
  },
  mounted() {
    this.fetchStatistics();
  },
  methods: {
    async fetchStatistics() {
      try {
        const response = await axios.get('/report/home/statistics');
        this.statisticsData = response.data; // 假设服务器直接返回了数据对象
        this.loading = false;
      } catch (err) {
        this.error = err.toString();
        this.loading = false;
      }
    }
  }
};
</script>

<style scoped>
.chart-container {
  border: black 1px solid;
  width: 100%;
  height: 400px; /* 增加高度以确保图表有足够空间 */
}
</style>



